<template>
<div class="viewport">
    <!--这是搜索框-->
    <div class="search-container gray borderd">
        <form action="" class="search-form" onsubmit="return false;">
            <div class="searchBarWrapper">
                <div class="search-form-box">
                    <span class="search-form-icon"></span>
                    <div class="search-form-input">
                        <input id="searchKeyWord" type="search" placeholder="搜索商品">
                        <i class="clearRemarks"></i>
                    </div>
                </div>
            </div>
        </form>
        <div class="optText">
            <a href="javascript:void(0);" onclick="history.go(-1)">取消</a>
        </div>
    </div>
        <!--这是建议搜索的内容-->
    <div class="sb-pop">
        <div class="sb-tit">热搜</div>
        <div class="sb-pop-content clear">
            <ul>
                <router-link to="searchResult">
                <li>
                   金富士
                </li>
                </router-link>
                <router-link to="searchResult">
                <li>
                    测试
                </li>
                </router-link>
                <router-link to="searchResult">
                <li>
                    手机
                </li>
                </router-link>
                <router-link to="searchResult">
                <li>
                    洗衣液
                </li>
                </router-link>
                <router-link to="searchResult">
                <li>
                    分期
                </li>
                </router-link>
                <router-link to="searchResult">
                <li>
                    价格
                </li>
                </router-link>
                <router-link to="searchResult">
                <li>
                    空调
                </li>
                </router-link>
                <router-link to="searchResult">
                <li>
                    京东
                </li>
                </router-link>
                <router-link to="searchResult">
                <li>
                    零食
                </li>
                </router-link>
                <router-link to="searchResult">
                <li>
                    苹果手机
                </li>
                </router-link>
                <router-link to="searchResult">
                <li>
                    手机 手机配件
                </li>
                </router-link>
            </ul>
        </div>
    </div>
</div>
</template>
<script>
export default {
    name: 'search',
    data () {
        return {
            
        }
    },
    created(){
        document.documentElement.scrollTop = 0;
    },
    components:{
    },
    watch:{

    }
}
</script>
<style scoped>
 .search-container {
    background-color: #fff;
}
.search-container.borderd {
    border-bottom: 1px solid #eee;
}
.search-container {
    position: relative;
    min-width: 320px;
    max-width: 750px;
    margin: 0 auto;
    z-index: 10;
    width: 100%;
    height: .88rem;

}
.search-container .search-form {
    padding-left: .32rem;
    padding-right: 1.24rem;
}
.search-container .search-form {
    display: inline-block;
    height: 100%;
    width: 100%;
    padding: 0 1.4rem 0 .32rem;
}
.search-container .search-form .searchBarWrapper {
    padding-top: .12rem;
}
.search-container.gray .search-form-box {
    background: #F2F2F2;
}

.search-container .search-form .search-form-box {
    position: relative;
    height: .64rem;
    line-height: .64rem;
    background-color: #fff;
    border-radius: 9999px;
    overflow: hidden;
}

.search-container .search-form .search-form-icon {
    background: url('../../../assets/img/icon-search.png') no-repeat;
    position: relative;
    float: left;
    vertical-align: top;
    width: .48rem;
    height: .48rem;
    background-size: contain;
    top: .08rem;
    margin: 0 .15rem 0 .16rem;
    z-index: 99;
}

.search-container .search-form .search-form-input {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    height: 100%;
    padding: 0 .72rem;
    background: #f2f2f2;
}
.search-container .search-form .search-form-input input {
    margin-top: .08rem;
    width: 100%;
    height: .48rem;
    line-height: .48rem;
    font-size: 0.26rem;
    background: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.clearRemarks {
    display: none;
    position: absolute;
    top: 50%;
    right: .2rem;
    width: .3rem;
    height: .3rem;
    transform: translateY(-50%);
    background: url(../../../assets/img/icon-clear.png);
    background-size: 100%;
    z-index: 98;
}
.search-container .optText {
    position: absolute;
    top: 0;
    right: .32rem;
    font-size: .3rem;
    line-height: .88rem;
}
.search-container .optText a {
    color: #424242;
}

.sb-pop {
    margin-bottom: .16rem;
    background-color: #fff;
}
.sb-tit {
    padding: 0 .32rem;
    height: 1.06rem;
    line-height: 1.06rem;
    font-size: .3rem;
    font-weight: bold;
    color: #424242;
    text-align: left;
}
.sb-pop .sb-pop-content {
    padding: 0 .32rem .32rem;
    height: 2.88rem;
    overflow: hidden;
}
.sb-pop .sb-pop-content li {
    float: left;
    margin: 0 .32rem .32rem 0;
    padding: 0 .32rem;
    height: .64rem;
    line-height: .64rem;
    font-size: .26rem;
    color: #424242;
    background: #F2F2F2;
    border-radius: 99999px;
    overflow: hidden;
}






</style>